Repository navigation
Consolidate the Anchor v1 and shank examples onto LiteSVM 0.18.2 and solana-kite 0.7.0 - #219
Merged
Merged
Conversation
The repository carried three LiteSVM versions: 0.18.1 in 35 crates,
0.16.0 in 58 Anchor v1 crates, and 0.13.1 in one native crate. It also
carried two solana-kite versions, 0.6.1 and 0.7.0. Nothing was broken by
this - LiteSVM 0.16.0 and 0.13.1 pin small Agave crates with `~` ranges,
which caps their graphs at the 4.2 and 4.0 lines, so neither could drift
to Agave 4.4. The spread was drift, not a defect.
Move the 58 Anchor v1 crates from LiteSVM 0.16.0 to 0.18.2 and the one
native crate from 0.13.1, which brings them from the Agave 4.2 and 4.0
lines onto 4.3, matching the rest of the repository.
litesvm and solana-kite have to move together: kite 0.6.1 requires
`litesvm ^0.16`, so bumping only one fails resolution. 57 crates move to
kite 0.7.0 alongside.
The kite upgrade needs no test changes. Comparing allow-list/anchor-v1
against allow-list/anchor, the `solana_kite` import blocks are identical
across 0.6.1 and 0.7.0 - `create_wallet`,
`send_transaction_from_instructions`, the four `token_extensions`
helpers, and `transfer_hook::{build_hook_accounts,
get_hook_accounts_address, HookAccount}`. The only difference between
those two files is that the v2 test sources LiteSVM, Keypair and Signer
from `anchor_v2_testing`, which is an Anchor-version artifact rather than
a kite one, so the v1 tests keep their direct imports.
Piloted on basics/transfer-sol/anchor-v1 before the bulk edit, since the
risk was anchor-lang 1.2.x colliding with LiteSVM 0.18.2's Agave 4.3
crates: it resolves to litesvm 0.18.2 with anchor-lang 1.2.2 and
solana-program-runtime 4.3.2, builds, and passes all three tests. Cargo
reports `agave-feature-set v4.3.2 (available: v4.4.1)`, which is LiteSVM
holding the Agave line that the hand-written `~4.3` pins used to hold.
Agave itself stays on 4.3.2. No LiteSVM release, tag or `master` targets
Agave 4.4, so 4.4 remains unreachable while the tests depend on LiteSVM.
Claude-Session: https://claude.ai/code/session_01YTTjefTz2Kbj8t5qg77kXg
The test asserted the created account's lamports equalled `Rent::default().minimum_balance(0)`, a constant from anchor-lang's bundled solana-program. The program under test calls `Rent::get()`, so the runtime's rent sysvar is the only value it can produce, and the two diverged: LiteSVM 0.16.0 resolves solana-rent ~4.3.0 while 0.18.2 resolves ~4.4.0, whose default rate gives 650240 lamports for a 0-data account rather than 890880. Read the sysvar instead, so the expectation follows the runtime. This needs the host-side `solana_rent::Rent`, because anchor-lang's own `Rent` does not implement LiteSVM's GetSysvar - the same split the pyth tests note for Clock. Verified by attribution rather than assumption: the test passes on main with litesvm 0.16.0 in a separate worktree, and failed only under the bump, so this is drift surfaced by the version move rather than a regression in the examples. Claude-Session: https://claude.ai/code/session_01YTTjefTz2Kbj8t5qg77kXg
The litesvm bump from 0.13.1 landed in the manifest but not in the
lockfile, which this example tracks, so the resolve never moved. The
lockfile is regenerated here; it drops wincode 0.4.9 and 0.5.5 for a
single 0.6.3, the version litesvm 0.18.2 serializes with.
With the resolve actually at 0.18.2 the test stopped compiling, for two
reasons a version bump alone does not show:
* `svm.set_account` takes the `Account` from solana-account 4.x, and
the dev-dependency asked for 3.x. Two majors of the same struct are
unrelated types to the compiler.
* `Transaction::new_signed_with_payer` sits behind solana-transaction
4.x's `wincode` feature. The test had been reaching it through
feature unification from the old litesvm, which 0.18.2 no longer
provides.
So the five host-side SDK crates move to the versions the rest of the
repository already pairs with litesvm 0.18.x - solana-account 4.3.0,
solana-pubkey 4.3, solana-transaction 4.2, solana-instruction 3.0.0,
solana-keypair 3.0.1 - and a comment records why the majors are not
interchangeable.
All five tests pass: the rental lifecycle suite and the client's own.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01YTTjefTz2Kbj8t5qg77kXg
Two separate breakages, both uncovered by the move to LiteSVM 0.18.2. The test calls `wincode::serialize` on a `VersionedTransaction` to get the exact wire bytes, and asked for wincode 0.5 while LiteSVM 0.18.2 resolves solana-transaction's serializer at 0.6. The two are unrelated crates to the compiler, so `VersionedTransaction` implements 0.6's `SchemaWrite` and not 0.5's, and the call did not compile. The v2 sibling already pairs the same test with wincode 0.6. The other version pins here move to the ones the rest of the repository uses with LiteSVM 0.18.x, so this example stops being the outlier on four crates. With it compiling, three of the four tests failed on `MaxLoadedAccountsDataSizeExceeded` at 114,254 bytes against a 64 KiB limit. The limit counts the program's own account, and this program's `.so` is 113,896 bytes on its own - the payer, the document account and the system program add 358. LiteSVM 0.16.0 did not charge the program account to the transaction's budget and 0.18.x does, which is why this only surfaced now, and why the byte-identical v2 test still passes: that program compiles to 18,880 bytes, comfortably inside 64 KiB. So the limit moves to 256 KiB and the comment says what actually dominates it, rather than claiming the four accounts together stay well under 64 KiB. Verified against LiteSVM 0.18.1 as well as 0.18.2: both report the same 114,254 bytes, so this is the 0.16 to 0.18 change rather than anything in the 0.18 line. All four tests pass. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01YTTjefTz2Kbj8t5qg77kXg
This was referenced Nov 26, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The repository ran three LiteSVM versions and two solana-kite versions. This moves the
0.16.0 and 0.13.1 groups up, leaving one kite version everywhere and one LiteSVM version
per branch pair:
The remaining 35 move in #218,
which raises the 0.18.1 floor and drops the hand-written Agave pins. The two branches share
no files.
The upgrade is coupled: kite 0.6.1 requires
litesvm ^0.16, so for the 56 crates that useboth, the two versions had to move together or resolution fails.
Audit, which should print one line each once #218 lands:
solana-kite0.6.1 → 0.7.0 needed no test changes. Comparingallow-list/anchor-v1againstallow-list/anchor, which was already on 0.7.0, thesolana_kiteimport blocks are identical:create_wallet,send_transaction_from_instructions, the fourtoken_extensionshelpers andtransfer_hook::{build_hook_accounts, get_hook_accounts_address, HookAccount}.Three things broke, all from crossing Agave 4.2 to 4.3
Every one of the 57 projects was built with
cargo build-sbfand run withcargo testagainst Agave 4.3.2. All 57 pass. Three needed a fix first, and none of the three was a
plain version bump.
basics/create-account— the rent rate movedThe test asserted the new account's lamports equalled
Rent::default().minimum_balance(0),a constant from anchor-lang's bundled
solana-program, and got 650,240 where it expected890,880. The program itself calls
Rent::get(), so the runtime's rent sysvar is the onlyvalue it can produce: LiteSVM 0.16.0 resolves
solana-rent ~4.3.0and 0.18.2 resolves~4.4.0, whose default rate differs.The test now reads the sysvar with
svm.get_sysvar(), the same pattern the pyth test alreadyuses for
Clock, so the expectation follows the runtime instead of a crate constant. Thatneeds the host-side
solana_rent::Rentas a dev-dependency, because anchor-lang's ownRentdoes not implement LiteSVM's
GetSysvar— the split the pyth test comments on.Note that
solana-rentis on its own 4.4 line independently of the Agave 4.3.2 crates, so"everything on 4.3" is not quite the right model: the small interface crates version
separately.
Four other tests use
Rent::default(), but they use it to fund accounts rather than toassert against what a program produced, so they are self-consistent and unaffected.
basics/transaction-v1— a wincode major split, then a budget that was never big enoughThe test calls
wincode::serializeon aVersionedTransactionto get the exact wire bytes.It asked for wincode 0.5 while LiteSVM 0.18.2 resolves solana-transaction's serializer at
0.6. Those are unrelated crates to the compiler, so
VersionedTransactionimplements 0.6'sSchemaWriteand not 0.5's, and the call did not compile. The v2 sibling already pairs thesame test with wincode 0.6.
With it compiling, three of its four tests failed on
MaxLoadedAccountsDataSizeExceededat114,254 bytes against a 64 KiB limit. That limit counts the program's own account, and this
program's
.sois 113,896 bytes on its own — the payer, the document account and the systemprogram add 358 between them. LiteSVM 0.16.0 did not charge the program account to the
transaction's budget and 0.18.x does.
This is also why the byte-identical v2 test still passes on a 64 KiB limit: that program
compiles to 18,880 bytes, six times smaller, and stays inside it. I checked the limit against
LiteSVM 0.18.1 as well as 0.18.2 — both report the same 114,254 bytes, so this is the 0.16 to
0.18 change rather than anything inside the 0.18 line.
The limit moves to 256 KiB and the comment now says what actually dominates it.
tools/shank-and-codama/native— the largest jump, and the only tracked lockfileThe plan expected 0.13.1 → 0.18.2 (Agave 4.0 → 4.3) to fight hardest, and to be dropped if it
did. It did not need to be.
This example tracks its own
Cargo.lock, so bumping the manifest alone left the resolve whereit was. Regenerating it drops wincode 0.4.9 and 0.5.5 for a single 0.6.3. The test then stopped
compiling for two reasons:
svm.set_accounttakes theAccountfrom solana-account 4.x and the dev-dependency askedfor 3.x. Two majors of the same struct are unrelated types.
Transaction::new_signed_with_payersits behind solana-transaction 4.x'swincodefeature.The test had been reaching it through feature unification from the old LiteSVM, which 0.18.2
no longer provides.
Its five host-side crates move to the versions the rest of the repository already pairs with
LiteSVM 0.18.x, so it stops being the outlier on all five.
Verification
Every project:
cargo build-sbfon each program in the project, thencargo test. 57 of 57pass.
Resolution was the thing being changed, so it was checked rather than assumed. Sampling across
project shapes,
cargo tree -i litesvmreports 0.18.2 andcargo tree -i solana-program-runtimereports 4.3.2 — with
agave-feature-set v4.3.2 (available: v4.4.1)visible in the tree, whichis LiteSVM holding the Agave ceiling where it should. No crate reaches 4.4.x by a path LiteSVM
does not constrain.
One note for whoever runs these next: delete each project's untracked
Cargo.lockbeforere-resolving. A stale lock makes cargo do a minimal update instead of a fresh resolve, and
when kite 0.6.1's
wincode ^0.5is already pinned in it, cargo keeps wincode 0.5.5 and thenpicks
solana-loader-v3-interface 8.0.1to match rather than the 8.1.1 a clean resolve picks.Two wincode majors in one graph, and the derive macro from one generates impls the other cannot
see. It fails as
UpgradeableLoaderInstruction: wincode::serde::Serialize is not satisfied,deep in a registry crate, and it is not a real breakage. Four projects reported it on the first
pass for exactly this reason and all four pass on a fresh lock.
Still unpinned upstream
litesvm 0.18.2declaressolana-loader-v3-interface ^8.0.1, a caret over a crate whosewincode major changed within the range: 8.0.x wants
wincode ^0.5.0and 8.1.x wants^0.6.0. A clean resolve takes 8.1.1 and unifies, so nothing is broken today, but the shapeis the same one that caused the Agave 4.4.0 breakage in
3134c69b:an upstream caret wide enough to admit an incompatible combination, over projects that commit
no lockfile. Worth knowing about rather than pinning around for now.
Generated by Claude Code